#include <iostream>
using namespace std;
int main()
{
    int n;
    cin >> n;
    string s1 = "* ";
    string s2 = " *";
    string s3;
     for(int i = 0; i < n; i++)
    {
        if(i%2 == 0)
            s3 = s1;
         else
             s3 = s2;
        for(int j = 0; j < n; j++)
        {
             cout << s3;   
        }
         cout << endl;
    }
}